package org.amphiprion.descentv2assistant.entity;

import java.util.List;

import org.amphiprion.descentv2assistant.App;

import android.util.SparseArray;

public class Lieutenant extends Entity implements IGenericMonster {
	private String name;
	private int act;

	private final SparseArray<MonsterCharacteristic> characteristics = new SparseArray<MonsterCharacteristic>();
	private MonsterAttack attack;
	private List<Ability> abilities;

	private int might;
	private int knowledge;
	private int willpower;
	private int awareness;

	private Product product;

	public Lieutenant(String id) {
		this.id = id;
	}

	@Override
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getMight() {
		return might;
	}

	public void setMight(int might) {
		this.might = might;
	}

	public int getKnowledge() {
		return knowledge;
	}

	public void setKnowledge(int knowledge) {
		this.knowledge = knowledge;
	}

	public int getWillpower() {
		return willpower;
	}

	public void setWillpower(int willpower) {
		this.willpower = willpower;
	}

	public int getAwareness() {
		return awareness;
	}

	public void setAwareness(int awareness) {
		this.awareness = awareness;
	}

	public MonsterCharacteristic getCharacteristic(int numberOfHero) {
		return characteristics.get(numberOfHero);
	}

	public void setCharacteristic(int numberOfHero, MonsterCharacteristic characteristic) {
		this.characteristics.append(numberOfHero, characteristic);
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public int getAct() {
		return act;
	}

	public void setAct(int act) {
		this.act = act;
	}

	public MonsterAttack getAttack() {
		return attack;
	}

	public void setAttack(MonsterAttack attack) {
		this.attack = attack;
	}

	public List<Ability> getAbilities() {
		return abilities;
	}

	public void setAbilities(List<Ability> abilities) {
		this.abilities = abilities;
	}

	@Override
	public MonsterCharacteristic getCharacteristic() {
		if (App.currentGameSession != null) {
			return getCharacteristic(App.currentGameSession.getNumberOfHeroes());
		} else {
			return null;
		}
	}

}
